package com.rj.bd.Login.dao;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.RequestMapping;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rj.bd.Login.entity.Login;

@RequestMapping("loginMapper")
public interface LoginMapper extends BaseMapper<Login>  {

	@Select(value = { "select * from login where loginId=#{loginId}" })
	public Login queryById(Login login);
	

	@Select("select * from login where loginId=#{loginId}")
	public Login queryById1(String loginId);


	@Select(value = { "select * from login where loginId=#{loginId}" })
	public Login queryAll(Login login);

	@Update(value = { "update login set password=#{password},lName=#{lName},lTime=#{lTime},remark=#{remark},lEmail=#{lEmail},lcode=#{lcode},lphone=#{lphone} where loginId=#{loginId}"})
	public void updateCode(Login login);

	@Update(value={"update login set lcode='' where loginId=#{loginId}"})
	public void delete(Login dcode);

	@Update(value={"update login set password=#{password} where loginId=#{loginId}"})
	public void edit(Login login);
}
